package com.xxx.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("`user`")
public class User implements Serializable {
    @ExcelProperty("登录名字")
    @ColumnWidth(20)
    private String loginName;
    @ExcelProperty("姓名")
    @ColumnWidth(20)
    @TableField("`name`")
    private String name;
    @ExcelProperty("密码")
    @ColumnWidth(20)
    @TableField(value = "`password`")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;
    @ExcelProperty("电话")
    @ColumnWidth(20)
    private String phone;
    @ExcelProperty("性别")
    @ColumnWidth(20)
    private String sex;
    @ExcelProperty("id")
    @ColumnWidth(20)
    @TableId
    private Integer userId;
    @ExcelProperty("部门")
    @ColumnWidth(20)
    private Integer departmentId;
    @ExcelProperty("岗位")
    @ColumnWidth(20)
    private String post;
    @ExcelProperty("创建时间")
    @ColumnWidth(20)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;
    @ExcelProperty("修改时间")
    @ColumnWidth(20)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;
    @ExcelProperty("创建用户")
    @ColumnWidth(20)
    private String createUser;
    @ExcelProperty("修改用户")
    @ColumnWidth(20)
    private String updateUser;
    @ExcelProperty("状态")
    @ColumnWidth(20)
    private Integer status;
    @ExcelProperty("删除")
    @ColumnWidth(20)
    @TableField("`delete`")
    @TableLogic // 标记为逻辑删除字段
    private Integer delete;


}
